<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"><!--ie使用edge渲染模式-->
    <meta name="renderer" content="webkit"><!--360渲染模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=no">
    <title>企业认6证</title>
    <link rel="stylesheet" href="../../css/basic.css">
    <style type="text/css">
        .certification-info-area{
            height: auto;
            width: 90%;
            margin: auto;
        }
        .certification-info-area ul{}
        .certification-info-area ul li{
            position: relative;
            height: 1.2rem;
            width: 100%;
            border-bottom: 1px solid #e3e3e3;
        }
        .li-type{}
        .li-type{
            line-height: 1.6rem;
            display: block;
            color: #666;
            font-size: 0.28rem;
            height: 100%;
            width: 18%;
            left: 0;
        }
        .input-area{
            background-color: transparent;
            font-size: 0.28rem;
            width: 76%;
            position: absolute;
            right: 0;
            bottom: 0.15rem;
            height: 0.5rem;
            padding-left: 6%;
            outline: none;
        }
        .select-local-area{
            font-size: 0.28rem;
            width: 76%;
            position: absolute;
            right: 0;
            bottom: 0.15rem;
            height: 0.5rem;
            padding-left: 6%;
            outline: none;
        }
        .certification-info-area ul li select{
            width: 30%;
            height: 100%;
            outline: none;
            color: #666;
        }
        .certification-info-area ul li select {
            /*Chrome和Firefox里面的边框是不一样的，所以复写了一下*/
            font-size: 0.28rem;
            /*很关键：将默认的select选择框样式清除*/
            background-color: white;
            appearance:none;
            -moz-appearance:none;
            -webkit-appearance:none;
            /*在选择框的最右侧中间显示小箭头图片*/
            background-image: url("../../../master/img/bottomIcon.jpg");
            background-repeat: no-repeat;
            background-position: center;
            background-size: 0.2rem;
            /*为下拉小箭头留出一点位置，避免被文字覆盖*/
            /*padding-right: 14px;*/
        }
        /*清除ie的默认选择框样式清除，隐藏下拉箭头*/
        .certification-info-area ul li select::-ms-expand { display: none; }
        .upload-certification-img{
            height: 2rem;
            width: 100%;
            margin: 0.6rem auto 0.2rem auto;
        }
        .upload-left{
            width: 50%;
            height: 100%;
            float: left;
        }
        .upload-right{
            height: 100%;
            width: 50%;
            float: right;
        }
        .agreement a{
            position: absolute;
            left: 0.5rem;
            top: 0.1rem;
            color: #666;
            font-size: 0.28rem;
        }
        .register-btn-area{
            width: 50%;
            height: 0.8rem;
            margin: auto;
        }
        .register-btn{
            height: 100%;
            width: 100%;
            background-color: #F23A38;
            border-radius: 10px;
            outline: none;
            color: white;
            font-size: 0.28rem;
        }
        /*上传图片*/
        #logo-container ,#logo-containerOne{
            margin: auto;
            overflow: hidden;
            height: 2rem;
            width: 2rem;
            position: relative;
            border: 1px solid transparent;
            border-image: initial;
            background-color: white;
        }
        #logo-container input ,#logo-containerOne input{
            margin: -2px;
            height: 2rem;
            width: 2rem;
            opacity: 0;
            position: absolute;
            z-index: 200;
            background-color: white;
        }
        .back-img,.back-imgOne{
            position: absolute;
            width: 2rem;
            height: 2rem;
            left: 0px;
            top: 0px;
        }
        .add-img{
            width: 0.5rem;
            height: 0.5rem;
            position: relative;
            top: 0.75rem;
            left: 0.75rem;
        }
        /*end*/
        .upload-title{
            width: 100%;
            height: 0.5rem;
        }
        .upload-title-left,.upload-title-right{
            text-align: center;
            width: 50%;
            height: 100%;
            font-size: 0.28rem;
            color:#666;
            background-color: white;
        }
        .upload-title-left{
            float: left;
        }
        .upload-title-right{
            float: right;
        }
        .certification-prompt-area{
            width: 100%;
            height: auto;
            color: #666;
            margin: 0.8rem auto;
            font-size: 0.28rem;
        }
        .certification-prompt-area span{line-height: 0.6rem}
    </style>
    <script src="../../lib/basicSize.js"></script>
</head>
<body>
<!--导航-->
<div class="top-nav-area">
    <ul>
        <a class="back-a" href="javascript:history.back(-1)"></a>
        <li>企业认证</li>
    </ul>
</div>
<!--主体-->
<div class="main-body-area">
    <div class="certification-info-area">
        <ul>
            <li>
                <span class="li-type">企业名称</span>
                <input class="input-area" type="text" placeholder="请输入企业名称">
            </li>
            <li>
                <span class="li-type">联系人</span>
                <input class="input-area" type="text" placeholder="请输入真实姓名">
            </li>
            <li>
                <span class="li-type">联系电话</span>
                <input class="input-area" type="text" placeholder="请输入手机号码">
            </li>
            <li>
                <span class="li-type">固定电话</span>
                <input class="input-area" type="text" placeholder="请输入座机号码">
            </li>
            <li>
                <span class="li-type">企业地址</span>
                <div class="select-local-area">
                    <select><option>省</option></select>
                    <select><option>市</option></select>
                    <select><option>区</option></select>
                </div>

            </li>
            <li>
                <span class="li-type">详细地址</span>
                <input class="input-area" type="text" placeholder="请输入详细地址">
            </li>
            <li>
                <span class="li-type">营业执照</span>
                <input class="input-area" type="text" placeholder="请输入营业执照号码">
            </li>
            <li>
                <span class="li-type">税务登记</span>
                <input class="input-area" type="text" placeholder="请输入税务登记号码">
            </li>
        </ul>
        <div class="upload-certification-img">
            <div class="upload-left">
                <div id="logo-container">
                    <input class="input-img-btn" accept="image/png,image/gif" type="file">
                    <img class="back-img" src="" id="img0" alt="">
                    <img id="add-img-btn" class="add-img" src="../../img/plus.png" alt="上传图片">
                </div>
            </div>
            <div class="upload-right">
                <div id="logo-containerOne">
                    <input class="input-img-btnOne" accept="image/png,image/gif" type="file">
                    <img class="back-imgOne" src="" id="img1" alt="">
                    <img id="add-img-btnOne" class="add-img" src="../../img/plus.png" alt="上传图片">
                </div>
            </div>
        </div>
        <div class="upload-title">
            <div class="upload-title-left">
                <span>上传营业执照</span>
            </div>
            <div class="upload-title-right">
                <span>上传税务登记照片</span>
            </div>
        </div>
        <div class="certification-prompt-area">
            <span>提示</span>
            <p>若您是"三证合一"的营业执照，税务登记号码和照片不可填写和上传，
                若您是旧版营业执照，两项都必须填写和上传，否则审核无法通过。</p>
        </div>
        <div class="register-btn-area">
            <button class="register-btn">申请认证</button>
        </div>
    </div>
</div>
<script src="../../lib/jquery/jquery.min.js"></script>
<script src="../../lib/upload/uploadPreview.min.js"></script>
<script src="../../lib/upload/uploadPreview.js"></script>
<script>
    $(document).ready(function () {
        // 图片预览
        $(".file-path").on("change",function() {
            var srcAll = getObjectURL(this.files[0]);   //获取路径
            $(this).siblings('.add-img').addClass('hide');  //this指的是input
            $(this).siblings(".back-pic").show();
            $(this).parent(".pictures-one").css("border","none");
            $(this).parent().next().children('.add-img').removeClass('hide');
            $(this).parent().next().children('.file-path').removeAttr('disabled');
            $(this).nextAll(".back-pic").attr("src",srcAll);
        });
        $(".input-img-btn").change(function(){
            var objUrl = getObjectURL(this.files[0]) ;
            if (objUrl) {
                $("#img0").attr("src", objUrl);
            }
            $("#add-img-btn").addClass('hide');
            $("#logo-container").css("border","none");
        });
        $(".input-img-btnOne").change(function(){
            var objUrl = getObjectURL(this.files[0]) ;
            if (objUrl) {
                console.log("1")
                console.log(objUrl)
                console.log("2")
                $("#img1").attr("src", objUrl);
            }
            $("#add-img-btnOne").addClass('hide');
            $("#logo-containerOne").css("border","none");
        });
        function getObjectURL(file) {
            var url = null;
            if (window.createObjectURL !== undefined) {
                url = window.createObjectURL(file)
            } else if (window.URL !== undefined) {
                url = window.URL.createObjectURL(file)
            } else if (window.webkitURL !== undefined) {
                url = window.webkitURL.createObjectURL(file)
            }
            return url
        };
    });
</script>
</body>
</html>